package cn.edu.sgu.www.mhxysy.dto.prop;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class PropCategoryDTO implements DataTransferObject {

	@ApiModelProperty(value = "ID")
	private String id;

	/**
	 * 道具名称
	 */
	@NotBlank(message = "道具名称" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "道具名称", required = true)
	private String name;

	/**
	 * 分类类型
	 */
	@Positive(message = "分类类型" + CustomMessages.ILLEGAL)
	@NotNull(message = "分类类型" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "分类类型", required = true)
	private Integer type;

	/**
	 * 排序号
	 */
	@ApiModelProperty(value = "排序号", required = true)
	private Integer pxh;

	/**
	 * 道具说明
	 */
	@ApiModelProperty(value = "道具说明")
	private String note;

	/**
	 * 分类深度
	 */
	@Positive(message = "分类深度" + CustomMessages.ILLEGAL)
	@NotNull(message = "分类深度" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "分类深度", required = true)
	private Integer deep;

	/**
	 * 是否主题表
	 */
	@Range(min = 0, max = 1, message = "是否主题表" + CustomMessages.ILLEGAL)
	@ApiModelProperty(value = "是否主题表", required = true)
	private Integer isTheme;

	/**
	 * 父分类ID
	 */
	@ApiModelProperty(value = "父分类ID")
	private String parentId;

	/**
	 * 排序字段
	 */
	@ApiModelProperty(value = "排序字段")
	private String orderBy;

	/**
	 * 分类字段
	 */
	@ApiModelProperty(value = "分类字段")
	private String sortField;

	/**
	 * 数据库表名
	 */
	@ApiModelProperty(value = "数据库表名")
	private String tableName;
}